package cn.com.cifi.mars.constant;

/**
* @Description:  大小写数据转换枚举
* @Author: wy
* @Date:
*/

public enum NumberEnum {

    ONT("一","1"),
    TWO("二","2"),
    THREE("三","3"),
    FOUR("四","4"),
    FIVE("五","5"),
    SIX("六","6"),
    SEVEN("七","7"),
    EIGHT("八","8"),
    NINE("九","9"),
    TEN("十","10"),
    ELEVEN("十一","11"),
    TWELVE("十二","12"),
    THIRTEEN("十三","13"),
    FOURTEEN("十四","14"),
    FIFTEEN("十五","15"),
    SIXTEEN("十六","16"),
    SEVENTEEN("十七","17"),
    EIGHTEEN("十八","18"),
    NINETEEN("十九","19"),
    TWENTY("二十","20"),
    ;

    private String key;
    private String value;

    NumberEnum(String key,String value) {
        this.key = key;
        this.value = value;
    }


    public static String getValueByKey(String key){
        for(NumberEnum numberEnum:NumberEnum.values()){
            if(key.equals(numberEnum.getValue())){
                return numberEnum.getKey();
            }
        }
        return  null;
    }

    public static String getKeyByValue(String key){
        NumberEnum[] numbers = values();
        for (NumberEnum numberEnum : numbers) {
            if (key.equals(numberEnum.getKey())) {
                return numberEnum.getValue();
            }
        }
        return null;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }


}
